import request from '@/utils/request'

export function page(params) {
  return request({
    url: 'ajax.devices/index',
    method: 'get',
    params
  })
}

export function edit(params){
  return request({
    url:'ajax.devices/edit',
    method:'get',
    params
  })
}
export function editpost(data){
  return request({
    url:'ajax.devices/edit',
    method:'post',
    data
  })
}

export function subdevicepage(params){
  return request({
    url:'ajax.subdevices/index',
    method:'get',
    params
  })
}

export function deviceuserpage(params){
  return request({
    url:'ajax.user.index/deviceuser',
    method:'get',
    params
  })
}

export function statistics(params){
  return request({
    url:'ajax.devices/report',
    method:'get',
    params
  }) 
}

export function ereport(params){
  return request({
    url:'ajax.devices/electricreport',
    method:'get',
    params
  })
}

export function subuser(params){
  return request({
    url:'ajax.subdevices/subuser',
    method:'get',
    params
  })
}

export function subusesave(data){
  return request({
    url:'ajax.subdevices/subusesave',
    method:'post',
    data
  })
}

export function subprojectlist(data){
  return request({
    url:'ajax.organizational/subprojectlist',
    method:'post',
    data
  })
}

// /devices/delete.html?device_id=7236"
export function remove(params){
  return request({
    url:'ajax.devices/delete',
    method:'get',
    params
  })
}

export function review(params){
  return request({
    url:'ajax.devices/review',
    method:'get',
    params
  })
}

export function doreview(data){
  return request({
    url:'ajax.devices/review',
    method:'post',
    data
  })
}


